<#assign ctx=springMacroRequestContext.contextPath />
<#include "/macro/publicMacro.ftl">
<#import "/macro/pagination.ftl" as Pagination>

<@header title="ImUserGroupAss列表">
    <link href="${ctx}/resource/common/css/pagination.css" rel="stylesheet">
    <link href="${ctx}/resource/frame/datetimepicker/jquery.datetimepicker.min.css" rel="stylesheet">
</@header>

<@body>
    <h2 class="module-title">ImUserGroupAss管理</h2>

    <div class="alert alert-primary" role="alert">
        <form class="form-inline form-margin" action="${ctx}/imUserGroupAss/list">
                <div class="form-group mb-2">
                    <label for="userId" >用户id:</label>
                    <input type="text" class="form-control" id="userId" name="userId" value="${imUserGroupAss.userId}">
                </div>
                <div class="form-group mb-2">
                    <label for="groupId" >群id:</label>
                    <input type="text" class="form-control" id="groupId" name="groupId" value="${imUserGroupAss.groupId}">
                </div>
                <div class="form-group mb-2">
                    <label for="tenantId" >租户Id:</label>
                    <input type="text" class="form-control" id="tenantId" name="tenantId" value="${imUserGroupAss.tenantId}">
                </div>

            <div class="form-group mx-sm-3 mb-2">
                <button type="submit" class="btn btn-primary">查询</button>
            </div>

            <@shiro.hasPermission name="imUserGroupAss:toAdd">
            <div class="form-group mx-sm-3 mb-2" style="float:right">
                <span style="float:left"><a href="${ctx}/imUserGroupAss/toAdd">添加数据</a></span>
            </div>
            </@shiro.hasPermission>
        </form>
    </div>

    <div class="table-responsive">
        <table class="table table-striped table-bordered">
            <thead>
                <th></th>
                <th>用户id</th>
                <th>群id</th>
                <th>租户Id</th>
                <th>操作</th>
            </thead>
            <tbody>
            <#list imUserGroupAsss.beans as imUserGroupAss>
                <tr>
                    <th>${imUserGroupAss.id!}</th>
                    <th>${imUserGroupAss.userId!}</th>
                    <th>${imUserGroupAss.groupId!}</th>
                    <th>${imUserGroupAss.tenantId!}</th>
                    <th><@shiro.hasPermission name="imUserGroupAss:view"><a class="btn btn-primary btn-sm" href="${ctx}/imUserGroupAss/view/${imUserGroupAss.id?c}" role="button" aria-pressed="true">详情</a></@shiro.hasPermission>
                        <@shiro.hasPermission name="imUserGroupAss:edit"><a class="btn btn-info btn-sm" href="${ctx}/imUserGroupAss/toEdit/${imUserGroupAss.id?c}" role="button" aria-pressed="true">编辑</a></@shiro.hasPermission>
                    </th>
                </tr>
            </#list>
            </tbody>
        </table>

        <@Pagination.pagination formId="imUserGroupAssForm"
            pageNo=imUserGroupAsss.pageNo
            pageTotal=imUserGroupAsss.pageTotal
            total=imUserGroupAsss.total
            pageSize=imUserGroupAsss.pageSize
            action="${ctx}/imUserGroupAss/list">
        </@Pagination.pagination>
    </div>
</@body>

<@footer>
    <script src="${ctx}/resource/frame/datetimepicker/jquery.datetimepicker.full.min.js"></script>

    <script type="text/javascript">
        $(function () {
        });
    </script>

    <script src="${ctx}/resource/common/js/pagination.js"></script>
    <script src="${ctx}/resource/common/js/jquery.validate.min.js"></script>
</@footer>